// babel-preset-taro 更多选项和默认值：
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
const path = require('path');

const plugins = [
  path.resolve(__dirname, "./babel/fuckingScrollView"),
  path.resolve(__dirname, "./babel/babel-plugin-replace-image"),
  ['@babel/plugin-proposal-decorators', {legacy: true}],
  ['@babel/plugin-proposal-class-properties', {loose: true}],
  ['@babel/plugin-proposal-private-methods', {loose: true}],
  '@babel/plugin-syntax-object-rest-spread',
  ['@babel/plugin-proposal-private-property-in-object', {loose: true}],
  'lodash',
];

module.exports = {
  sourceMap: true,
  presets: [
    ['taro', {
      framework: 'react',
      hot: false,
      ts: true
    }]
  ],
  plugins: plugins,
};
